import axios from 'axios'

const instance = axios.create({
  baseURL: 'https://be89-27-223-76-238.ngrok-free.app/',
  timeout: 1000,
})

instance.interceptors.request.use(
  (config) => {
    return config
  },
  (error) => {
    return Promise.reject(error)
  },
)

instance.interceptors.response.use(
  (response) => {
    return response
  },
  (error) => {
    return Promise.reject(error.response.data)
  },
)

export default instance
